<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #oBox {
      width: 500px;
      height: 260px;
      background-color: pink;
      margin: 100px auto;
    }
  </style>
  <script src="./node_modules/lodash/lodash.min.js"></script>
</head>

<body>
  <div id="oBox"></div>
  <script>
    oBox.onmousemove = _.throttle(function (e) {
      const left = e.pageX - this.offsetLeft
      const top = e.pageY - this.offsetTop
      this.innerHTML = `left: ${left}, top: ${top}`;
    }, 500);
  </script>
</body>

</html>